package admin

import (
	"github.com/gin-gonic/gin"
	"server/middle_ware"
)

//管理员模块路由
func RouterAdmin(router *gin.RouterGroup) {

	//admin login
	router.POST("/login", Login)

	//查询所有用户
	router.GET("/AllUser",middle_ware.JwtTokenValid,AllUser)

	//删除用户
	router.GET("/DeleteUser",middle_ware.JwtTokenValid,DeleteUser)

	//增加商品
	router.POST("/AddProduct",middle_ware.JwtTokenValid,AddProduct)

	//展示所有商品
	router.GET("/showProduct",middle_ware.JwtTokenValid,ShowProduct)

	//删除商品
	router.POST("/deleteProduct",middle_ware.JwtTokenValid,DeleteProduct)

	//搜索商品
	router.POST("/searchProduct",middle_ware.JwtTokenValid,SearchProduct)

	//展示所有订单
	router.GET("/showAllOrder",middle_ware.JwtTokenValid,ShowAllOrder)

	//展示所有反馈
	router.GET("/feedback",middle_ware.JwtTokenValid,Feedback)



}
